package com.igbeok.miscellaneous.concurrency.briangoetz;

public class TwoThreads {

	private class Thread1 extends Thread{
		public void run(){
			System.out.println("A1");
			System.out.println("A2");
			System.out.println("A3");
			System.out.println("A4");
			System.out.println("A5");
			System.out.println("A6");
			System.out.println("A7");
			System.out.println("A8");
			System.out.println("A9");
			System.out.println("A10");
		}
	}
	
	public class Thread2 extends Thread{
		public void run(){
			System.out.println("1");
			System.out.println("2");
			System.out.println("3");
			System.out.println("4");
			System.out.println("5");
			System.out.println("6");
			System.out.println("7");
			System.out.println("8");
			System.out.println("9");
			System.out.println("10");
		}
	}
	
	public static void main(String[] args) {
		TwoThreads twoThreads = new TwoThreads();
		Thread1 thread1 = twoThreads.new Thread1();
		Thread2 thread2 = twoThreads.new Thread2();
		thread1.start();
		thread2.start();
	}
}
